﻿using System.Transactions;
using Castle.DynamicProxy;

namespace Unis.Framework.Core.AOP
{
    public class TransactionInterceptor : IInterceptor
    {
        public void Intercept(IInvocation invocation)
        {
            using (TransactionScope scope = new TransactionScope())
            {
                invocation.Proceed();
                scope.Complete();
            }
        }
    }
}

